#pragma once

#include "stack.h"
#include "StringParser.h"

typedef int scalar;

class Calculator
{
private:
	char *formula;
	myStack<scalar> numeric;
	myStack<char> symbol;

public:
	Calculator(string input)
	{
		formula = new char[sizeof(char) * input.length()]; 
		for (unsigned int i = 0; i < input.length(); ++i)
			formula[i] = input[i];
	}
	~Calculator() { delete []formula; }
	
	scalar Answer();
	void SaveToken();
	scalar Arithmetic(char opt);

	int isp(char opt);
	int icp(char opt);

};